# -*- coding: utf-8 -*-
# created on 2017/01/20

from mathsolver.functions.base import BaseFunction
from mathsolver.functions.hanshu.duicheng_jisuan import DuiChengZhongXing


class DuiChengQiuZuiZhi(BaseFunction):
    def solver(self, *args):
        func, question = args

        # 求对称中心
        # TODO: 方程太复杂 恒成立解决不了
        step_solver = DuiChengZhongXing().solver(func)
        self.steps.extend(step_solver.steps)
        a, b = step_solver.output[0].value['value']
        res = 2 * b
        print(res)
        return self


if __name__ == '__main__':
    pass
